import dt from '@dt/dt'

let _this = null
let acquisitionMethodOption = [
  { key: 1, value: '客户授权' },
  { key: 2, value: '客户来电' },
  { key: 3, value: '手动分配' },
  { key: 4, value: '场外报备' },
  { key: 5, value: '手动录入' },
]

function options(vm, head) {
  _this = vm
  return [
    {
      title: '线索来源渠道',
      field: 'channelName',
      minWidth: 160,
    },
    {
      title: '获取方式',
      field: 'type',
      minWidth: 130,
      cell: {
        value: (row) => {
          let filter = acquisitionMethodOption.filter(item => item.key == row
            .type)
          return filter.length ? filter[0].value : '-'
        },
        text: {}
      }
    },
    {
      title: '线索生成日期',
      field: 'time',
      minWidth: 180,
    }

  ]
}

export default {
  options
}